<template>
    <div id="app">
      <el-container class="el-container">
        <el-header style="width:100%;height: auto;display: flex;flex-direction: row;justify-content: space-between;">
          <div class="rightHeader">
            <img class="Logo" src="static\images\LogoEnglish.png" alt="请检查网络" />
          </div>
          <div class="leftHeader">
            <div>
              <el-avatar :src="userImage"></el-avatar>
            </div>
            <el-dropdown>
              <span class="el-dropdown-link">
                {{userName}}<i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown" :router="true">
                  <el-dropdown-item disabled>
                    <div>
                      <span>身份： </span>
                      <span>{{userIdentity}}</span>
                    </div>
                  </el-dropdown-item>
                <router-link to="/Setting">
                  <el-dropdown-item divided><i class="el-icon-setting"></i>设置</el-dropdown-item>
                </router-link>
                <router-link to="/">
                  <el-dropdown-item divided> <i class="el-icon-switch-button"></i>退出</el-dropdown-item>
                </router-link>
              </el-dropdown-menu>
            </el-dropdown>
          </div>
        </el-header>
        <div class="leftContainer">
          <el-container style="overflow-y: hidden;overflow-x: hidden;">
            <el-aside width="200px">
              <el-menu :unique-opened="true" :router='true'>
                <el-menu-item index="/index"><i class="el-icon-message"></i>首页</el-menu-item>
                <el-submenu index="2">
                  <template slot="title"><i class="el-icon-mobile"></i>软件信息</template>
                  <el-menu-item-group>
                    <template slot="title">数据情况</template>
                    <el-menu-item index="/SoftwareCore">核心数据</el-menu-item>
                    <!-- <el-menu-item index="/SoftwareRealTime">实时数据</el-menu-item> -->
                  </el-menu-item-group>
                  <el-menu-item-group title="性能质量">
                    <el-menu-item index="/SoftwareApi">API性能监测</el-menu-item>
                  </el-menu-item-group>
                  <!-- <el-submenu index="2-4">
                    <template slot="title">选项4</template>
                    <el-menu-item index="2-4-1">选项4-1</el-menu-item>
                  </el-submenu> -->
                </el-submenu>
                <el-submenu index="3">
                  <template slot="title"><i class="el-icon-user"></i>成员管理</template>
                  <el-menu-item-group>
                    <!-- <template slot="title">权限管理</template> -->
                    <el-menu-item index="/ProjectMembers">项目成员</el-menu-item>
                    <el-menu-item index="/ExperienceMembers">体验成员</el-menu-item>
                    <!-- <el-menu-item index="3-3">选项3</el-menu-item> -->
                  </el-menu-item-group>
                  <!-- <el-menu-item-group title="分组2">
                    <el-menu-item index="3-3">选项3</el-menu-item>
                  </el-menu-item-group> -->
                  <!-- <el-submenu index="3-4">
                    <template slot="title">选项4</template>
                    <el-menu-item index="3-4-1">选项4-1</el-menu-item>
                  </el-submenu> -->
                </el-submenu>
                <!-- <el-menu-item index="#"><i class="el-icon-message"></i>论坛管理</el-menu-item> -->
                <el-submenu index="4">
                  <template slot="title"><i class="el-icon-message"></i>论坛管理</template>
                  <el-menu-item-group>
                    <template slot="title">评论管理</template>
                    <el-menu-item index="/Dictionary">评论审核</el-menu-item>
                    <!-- <el-menu-item index="/SchoolINfo">院校信息</el-menu-item>
                    <el-menu-item index="/CourseManagement">课程管理</el-menu-item> -->
                  </el-menu-item-group>
                  <!-- <el-menu-item-group title="数据管理">
                    <el-menu-item index="/Announcement">数据维护</el-menu-item>
                  </el-menu-item-group> -->
                  <el-menu-item-group title="创建审核">
                    <el-menu-item index="/versionReview">论坛审核</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="5">
                  <template slot="title"><i class="el-icon-s-data"></i>数据管理</template>
                  <el-menu-item-group>
                    <template slot="title">软件信息</template>
                    <el-menu-item index="/Dictionary">字典设置</el-menu-item>
                    <el-menu-item index="/SchoolINfo">院校信息</el-menu-item>
                    <el-menu-item index="/CourseManagement">课程管理</el-menu-item>
                  </el-menu-item-group>
                  <!-- <el-menu-item-group title="信息审核">
                    <el-menu-item index="/Announcement">公告管理</el-menu-item>
                  </el-menu-item-group> -->
                  <el-menu-item-group title="社团管理">
                    <el-menu-item index="/societiesView">信息管理</el-menu-item>
                  </el-menu-item-group>
                  <!-- <el-menu-item-group title="版本管理">
                    <el-menu-item index="/versionReview">版本审核</el-menu-item>
                  </el-menu-item-group> -->
                </el-submenu>
                <el-submenu index="6">
                  <template slot="title"><i class="el-icon-document"></i>消息</template>
                  <el-menu-item-group>
                    <!-- <el-menu-item index="/Inbox">收件箱</el-menu-item> -->
                    <el-menu-item index="/Notice">通知</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-menu-item index='/Setting'><i class="el-icon-setting"></i>设置</el-menu-item>
              </el-menu>
            </el-aside>
            <el-container>
              <el-main>
                <router-view />
              </el-main>
            </el-container>
          </el-container>
        </div>
      </el-container>
    </div>
  </template>
  
  <script>
  export default {
    data () {
      return {
        LoginState:this.global.LoginState,
        userIdentity:'',
        userName:'',
        userImage:sessionStorage.getItem("image")
      }
    },
    mounted() {
      // this.open();
      // console.log(this.LoginState); 获取登录状态
      // console.log(sessionStorage.getItem("permissions"))
      if(sessionStorage.getItem("permissions")==1){
        this.userIdentity='管理员';
        this.userName=sessionStorage.getItem("userName");
        // var userInfo=sessionStorage.getItem("userInfo");
        // console.log(userInfo.userName);
        // this.userName=userInfo.userName;
      }
    },
    methods: {
        open() {
          this.$alert('该管理系统请在网页中全屏使用', '系统提示', {
            confirmButtonText: '我已知晓',
          });
        }
      }
  }
  </script>
  
  <style>
  *{		/* CSS Reset */
      margin : 0;
      padding : 0;
      }
   /* ::-webkit-scrollbar {
       width: 0 !important;
     }
     ::-webkit-scrollbar {
       width: 0 !important;height: 0;
     } */
  body {
    margin: 0;
    padding: 0;
  }
  
  .router-link-active {
    text-decoration: none;
    color: #fff;
  }
  
  a {
    text-decoration: none;
    color: #303133;
  }
  
  
  #app {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
      "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* text-align: center; */
    /* color: #2c3e50; */
    /* margin-top: 60px; */
  }
  
  .el-header .Logo {
    width: 190px;
    height: 66px;
  }
  
  .handButton {
    display: flex;
    flex-direction: row;
    align-content: center;
  }
  
  .el-header {
    background-color: #024da2;
    color: #333;
    display: flex;
    flex-direction: row;
    align-content: center;
    /* width: 100%; */
    padding-left: 1.5vw;
    padding-bottom: 2vh;
    padding-top: 2vh;
  }
  
  .el-aside {
    height: 87vh;
    background-color: #FFFFFF;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  
  .el-main {
    background-color: #e1e7ec;
    color: #333;
    text-align: center;
  }
  
  body>.el-container {
    height: 100%;
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
  
  .leftContainer,.el-aside {
    height: 100%;
    overflow-x: hidden;
  }
  .el-aside::-webkit-scrollbar {
      display: none;
    }
  
  
  .leftHeader {
    display: flex;
    align-items: center;
    margin-right: 20px;
  }
  
  .leftHeader span {
    margin-left: 10px;
    color: #f8f8f8;
  }
  
  .head {
    width: 98%;
    min-width: 1200px;
    max-width: 100%;
    min-height: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    background-color: white;
    padding: 13px;
    border-radius: 20px;
  }
  
  .head:hover{
    box-shadow: 0 0 15px #d5d5d5;
  }
  </style>
  